package cn.wolfcode.luowowo.msg;

import cn.wolfcode.luowowo.common.CodeMsg;

import java.text.MessageFormat;

/**
 * Created by wolfcode-lanxw
 */
public class MemberCodeMsg extends CodeMsg {


    public MemberCodeMsg(Integer code, String msg){
        super(code,msg);
    }
    public static final MemberCodeMsg DEFAULT_ERROR = new MemberCodeMsg(500101,"会员服务繁忙,稍后再试") ;
    public static final MemberCodeMsg PARAEN_ERROR = new MemberCodeMsg(500102,"参数异常:{0}");
    public static final MemberCodeMsg PHONE_EXISTS_ERROR = new MemberCodeMsg(500103,"手机号码已经被注册");
    public static final MemberCodeMsg LOGIN_ERROR = new MemberCodeMsg(500104,"账号密码有误") ;
    public MemberCodeMsg fillArgs(Object... args){
        return new MemberCodeMsg(this.getCode(), MessageFormat.format(this.getMsg(),args));
    }

}
